<?php
$baseTheme = 'pepper-grinder';
$module = 'agent';
// Various Servers and Addresses
$baseUrl = $this->baseUrl();
// Content Delievery Server i.e. static Files, e.g. CSS, JS, Themes and related images etc
$cdnServer = $baseUrl;
?>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
	<meta http-equiv="Content-Language" content="en-GB" />
	<meta name="description" content="Suryansh Group is one of the leading organizations that provides real estate solutions. We provide services for Original Bookings, Investments, Documentation, Transfers, Property survey and Sale-Purchase of Residential & Commercial Plots, Villas, Bungalows, Flats, Independent Floors, Offices, Shops etc in India." />
	<meta name="keywords" content="real estate, land, estate, property, buy, sell, Residential, Commercial Plots, Villas, Bungalows, Flats, Independent Floors, Offices, Shops, projects, thesuryanshgroup, suryanshgroup, suryansh, building,rent" />
	<meta name="robots" content="index, follow" />
	<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $baseUrl?>/css/style.css" />
	<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $baseUrl?>/css/agentmod.css" />
	<title>The Suryansh Group</title>
	<?php
//Jquery UI Theme
$this->jQuery()->addStylesheet($cdnServer . '/css/themes/jqueryui/' . $baseTheme . '/jquery-ui-1.8.14.css');
// Jquery
$this->jQuery()->setLocalPath($cdnServer . '/js/jquery-1.5.1.min.js');
// Jquery UI
$this->jQuery()->setUiLocalPath(
$cdnServer . '/js/jquery-ui-1.8.14.custom.min.js');
echo $this->headMeta();
echo $this->headTitle();
echo $this->headLink();
echo $this->jQuery()->uiEnable();
/*
 * set body color by -> style="background-image: url('<?php $cdnServer; ?>/css/themes/jqueryui/<?php echo $baseTheme;?>/images/ui-bg_glass_100_fdf5ce_1x400.png');"
 */
?>
</head>
<body>

<span class="ui-corner-all errorBox" style="top: 0;left:0; width:100%; position:fixed; z-index: 999; display: none;" ><span style=" background-color:#eee; padding: 0.5em; " class="ui-state-error ui-corner-bottom "  id="errorBox" >hello</span> <a href="javascript:void(0);">Hide</a></span>
<div id='topMenu' class='ui-priority-secondary ui-corner-bottom ui-widget-overlay' >

</div><span id="topRightInfo"> <span
	class="ui-state-default ui-corner-all noprint">Today&rsquo;s date: <span
	id="datetext"><?php
$date = new Zend_Date();
echo $date->get(Zend_Date::DATE_MEDIUM)?></span></span>
<?php
if (Zend_Auth::getInstance()->hasIdentity()) {
    
    $authContent = Zend_Auth::getInstance()->getStorage()->read();
    if (is_array($authContent)) {
        $id = $authContent['identity'];
    } else {
        $id = $authContent;
    }
    if ($id != 'anon') {
        $userSession = new Zend_Session_Namespace('userSession');
        $userHome = $userSession->userHome;
        ?>
    <span class="ui-state-default ui-corner-all noprint"><span  class="noprint" >Hi!</span> <span id="userName"><a href="<?php echo isset($userHome)?$baseUrl.$userHome:'#';?>" ><?php echo $id;?></a></span></span>
	<span class="ui-state-default ui-corner-left noprint"><a id="logout"
	href="<?php
        echo $this->url(array('module'=>'default', 'controller' => 'authenticate', 'action' => 'logout'))?>">
Logout<span
	class="ui-icon ui-icon ui-icon-closethick ui-state-default ui-corner-right"
	style="float: right; padding-left: 1px; margin-left: -1px; margin-top: -1px;"> </span></a></span>
	<?php
    } else {?>
	<span class="ui-state-default ui-corner-all"><a id="login" href="<?php echo $this->url ( array('module'=>'default', 'controller' =>'authenticate', 'action' => 'index'))?>">
		Login</a></span>
<?php }
} else {?>
	<span class="ui-state-default ui-corner-all"><a id="logout" href="<?php echo $this->url ( array('module'=>'default', 'controller' =>'authenticate', 'action' => 'index'))?>">
		Login</a></span>
<?php }?>
</span>

		<ul id="menu">
			<li><a class="current ui-widget-header ui-corner-all"  href="<?php echo $baseUrl?>/">HOME</a></li>
			<li><a class="ui-widget-header ui-corner-all"  href="<?php echo $baseUrl?>/aboutus">ABOUT US</a></li>
			<li><a class="ui-widget-header ui-corner-all"  href="<?php echo $baseUrl?>/companyprofile">CORPORATE PROFILE</a></li>
			<li><a class="ui-widget-header ui-corner-all"  href="<?php echo $baseUrl?>/serviceportfolio">SERVICE PORTFOLIO</a></li>
			<!--<li><a class="ui-widget-header ui-corner-all"  href="<?php echo $baseUrl?>/search">SEARCH</a></li>
			--><li><a class="ui-widget-header ui-corner-all"  href="<?php echo $baseUrl?>/sell">UPLOAD YOUR PROPERTY</a></li>
			<li><a class="ui-widget-header ui-corner-all"  href="<?php echo $baseUrl?>/careers">CAREERS</a></li>
			<li><a class="ui-widget-header ui-corner-all"  href="<?php echo $baseUrl?>/news">NEWS &amp; UPDATES</a></li>
			<li><a class="ui-widget-header ui-corner-all"  href="<?php echo $baseUrl?>/contactus">CONTACT US</a></li>
		</ul>
		<div class="ui-state-highlight" style="float:right">
		<form style="float: right; " id="projectSearch" class="ui-corner-all" action="javaScript:submitProjectSearch();"  >
                        	
	<label><select name="estate_type" class="selectInput specDiv" style="padding:2px; margin:2px; width:150px">
                                		<option value="-1">Search For</option>
                                		<option value="project" >Project</option>
                                		<option value="property">Property</option>
                        			</select></label>
	<label><select id="state" name="state" style="padding:2px; margin:2px; width:150px">
			<option></option>
			</select></label>
		<label><select id="district" name="district" disabled="disabled" style="padding:2px; margin:2px; width:150px">
			<option value="-1" >District/City</option>
			</select></label>
			<label><select name="category_id" class="selectInput specDiv" style="padding:2px; margin:2px 2px 2px 3px; width:150px">
        		<option value="-1">Estate Category</option>
        		<option value="RES" >Residential</option>
        		<option value="COM">Commercial</option>
        		<option value="IND">Industrial</option>
			</select></label>
			<label><select name="type_id" class="selectInput specDiv" disabled="disabled" style="padding:2px; margin:2px; width:150px">
						<option value="-1">Types</option>
					</select>
			</label>
		<label><input name="price" id="price" size="10" maxlength="10" value=":approx Price" style="padding:2px; margin:2px; width:145px" /></label>
		<button type="submit">Search</button>
						</form>
</div>
	<div id="wrapper">
				
	<div id="leftSide" class="ui-corner-all">
		<a href="<?php echo $baseUrl?>/agent"><strong style="font-size:20px; border-bottom: solid 3px;">My Home </strong></a>
		<h3> My Profile </h3>
		<ul class="leftSideUlClass">
			<li ><a href="<?php echo $baseUrl?>/agent/profile">My Profile</a></li>
			<li ><a href="<?php echo $baseUrl?>/index/changepassword">Change Password</a></li>
		</ul>
		<h3> My Account </h3>
		<ul>
			<li><a href="<?php echo $baseUrl?>/agent">Business Account</a></li>
			<li><a href="<?php echo $baseUrl?>/agent/account/network">Network Account</a></li>
		</ul>
		
		<h3> My Network </h3>
		<ul>
			<li><a href="<?php echo $baseUrl?>/agent/network">View Network</a></li>
		</ul>
		
		<h3> My Uploaded Properties </h3>
		<ul>
			<li><a href="<?php echo $baseUrl?>/sell">Upload New</a></li>
			<li><a href="<?php echo $baseUrl?>/agent/property/view">View Uploaded</a></li>
		</ul>
		
		<h3> Requirments </h3>
		<ul>
			<li><a href="<?php echo $baseUrl?>/requirement">Submit Requirments</a></li>
		</ul>
		
		<h3> Misc. </h3>
		<ul>
			<li><a href="<?php echo $baseUrl?>/agent/benefit">My Benefit</a></li>
			<li><a href="<?php echo $baseUrl?>/agent/tt">Tips &amp; Topics</a></li>
			<li><a href="<?php echo $baseUrl?>/agent/faq">FAQ</a></li>
		</ul>
	</div> <!-- End #leftSide -->	
		
	<div id="contentAgnt" class="wrap">
		 <?php echo $this->layout()->content; ?>
	</div>
	
	</div> <!-- End #wrapper -->
	
	<div id="skyline">&nbsp;</div>
	<div id="promo">
		<div class="wrap">	
			<div class="col" style="width:500px">
				<h2>About Us</h2>
				<img align="left" src="<?php echo $baseUrl?>/images/about_us_2.jpg" alt="Featured Image" width="250" style="padding:5px;"/>	
				<p style="text-align:justify">Suryansh Group is one of North India's most prominent and a fast growing business houses, founded by the visionary Mr. Sanjeev Rajput, who serves as the Managing Director. The Group started its business in Real Estate sector, as a business Promoter &amp; Developer. <br /><a href="<?php echo $baseUrl?>/aboutus" title="more about us">See more...</a></p>
			</div>
			<div class="col_last">
				<h2>Stay connected</h2>
				<a href="http://twitter.com/suryanshambala" ><img src="<?php echo $baseUrl?>/images/twitter_logo.png" align="top" height="45" width="45"/></a>
				<a href="http://www.facebook.com/home.php#!/pages/Suryansh-Group/179281398784333" ><img src="<?php echo $baseUrl?>/images/facebook-logo1.png" align="top" height="45" width="45"></a><br />
				<a href="http://in.linkedin.com/pub/suryansh-group-ambala/27/473/aa3" ><img src="<?php echo $baseUrl?>/images/linkedin-logo.png" align="top" height="40" width="100"></a>
			</div>
			<div class="col" style="width:300px">
				
			</div> 
			<div id="footer">
				 <p align="center"> 
				 	<a href="http://www.rfacts.in/">Developers</a> &nbsp; &middot; &nbsp;
				 	<a href="<?php echo $baseUrl?>/tools/areaconvertor">Area Conversion Tool</a>&nbsp; &middot; &nbsp;
				 	<a href="<?php echo $baseUrl?>/reg">Real Estate Glossary</a>&nbsp; &middot; &nbsp;
				 	<a href="<?php echo $baseUrl?>/nriegc">NRI Eligibility Criteria </a>&nbsp; &middot; &nbsp;
				 	<a href="<?php echo $baseUrl?>/careers">Carrers</a> &nbsp; &middot; &nbsp;
				 	<a href="<?php echo $baseUrl?>/tc">Terms &amp; Conditions</a>&nbsp; &middot; &nbsp;
				 	<a href="<?php echo $baseUrl?>/privacypolicy">Privacy Policy</a> 
				 </p>
				 
			</div>
		</div>
	</div>
	<?php
echo $this->headScript()?>
<script>
var urlFillCity = "<? echo $this->url(array('module'=>'default','controller' => 'search','action' => 'fillcity'))?>";
var urlFillState = "<? echo $this->url(array('module'=>'default','controller' => 'search','action' => 'fillstate'))?>";
var urlFillDistrict = "<? echo $this->url(array('module'=>'default','controller' => 'search','action' => 'filldistrict'))?>";
var estateTypes = {};
estateTypes.RES = {FLAT:'Flat',VILLA:'Villa',PLOT:'Plot',BNGLO:'Banglow',KOTHI:'Kothi'};
estateTypes.COM = {PLOT:'Plot',SHOP:'Shop',SROOM:'Showroom',CSPACE:'Commercial Space',CLAND:'Commercial Land'};
estateTypes.IND = {ILAND:'Industrial Land',SITE:'Site'};
$('.errorBox > a').click(function(){$(this).parent().hide();});

$.ajax({
    url : urlFillState,
    dataType : 'json',
    success: function(jStates){
    	var selectOptionString = '<option value ="-1">States</option>';
		$.each(jStates, function (index, states) {
			selectOptionString += '<option value ="'+states.state+'">'+states.state+'</option>';
		});
        $('#state').html(selectOptionString);
   },
   error: function(event) {
        alert(event.responseText);
   }
});

$(document).ready(function(){
    $('#state').change(function(){
        var state = $(this).val();
        $.ajax({
            url : urlFillDistrict,
            dataType : 'json',
            data : {state : state },
            success: function(jDistrict){
            	var selectOptionString = '<option value ="-1">District/City</option>';
    			$.each(jDistrict, function (index, district) {
    				selectOptionString += '<option value ="'+district.district+'">'+district.district+'</option>';
    			});
                $('#district').html(selectOptionString).attr('disabled','');
           },
           error: function(event) {
                alert(event.responseText);
           }
        });

    });


    $(':input[name="category_id"]').bind('change',function() {
        updatePTypes($(this));
    });
});


function updatePTypes(categoryElem) {
    pType = categoryElem.val().toUpperCase();
    switch (pType) {
			case 'RES' :
			case 'COM' :
			case 'IND' :
  			var selectString = '';
  			$.each(estateTypes[pType], function (index, name) {
  				selectString += '<option value ="'+index+'">'+name+'</option>';
  			});
  			
  			categoryElem.parent().next()
  						.find(':input[name="type_id"]')
  						.html(selectString)
  						.attr('disabled','');
			break;
		default :
          console.log('pType :"'+pType+'" is not in cases.');
			break;
	}
}

function submitProjectSearch() {
	formData = getValues('#projectSearch');
	var searchUrl = '<?php echo $this->baseUrl('search/project') ?>';
	window.location.href = searchUrl+'?'+$.param(formData);
}

function getValues(formId) {
    var formData = {}; 
    $(formId).find(':input')
    		.not(':input[value^="-1"],:input[value^=":"],button[type="reset"]')
    		.each(function(){ 
    			formData[this.name] = this.value; 
        });
	return formData;
}
</script>
</body>
</html>